package koala.kuangjiademo.data;

import com.google.gson.annotations.SerializedName;

public class IResponse {
    public transient String rawResponse;
    @SerializedName("code")
    public int error_code;
    @SerializedName("desc")
    private String message;
    private static final int LOCALL_ERROR = -1;

    public boolean isSuccess() {
        return error_code == 0;
    }

    public void setMessage(String message) {
        this.message = message;
        error_code = LOCALL_ERROR;
    }

    public String getMessage() {
        return message;
    }
}
